import requests

url = "https://m.douban.com/rexxar/api/v2/movie/recommend"

# get请求携带的参数
data = {
    "refresh": "0",
    "start": "0",
    "count": "20",
    "selected_categories":"{}",
    "uncollect": "false",
    "tags": ""
}

# 处理反爬
headers = {
    "User_Agent" : "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
}

res = requests.get(url,params=data,headers=headers)

# print(res.text)

print(res.request.url)


